package com.google.jessewilson.codesearch.ui;

/**
 * A simplified clipboard that works only with strings, and
 * only works on a best-effort basis.
 *
 * @author jessewilson
 */
public interface Clipboard {

  /**
   * On a best-effort basis, set the clipboard contents to the
   * specified text.
   *
   * @return true if the clipboard was updated successfully.
   */
  boolean setContents(String text);

  /**
   * On a best-effort basis, get the clipboard contents, or {@code null} if the contents
   * do not exist or are not text.
   */
  String getContents();
}
